<% form_for(@user) do |f| %>
<%= error_messages_for :user, :header_message => "Por favor intente de nuevo.", :message => "Encontramos un error en los siguientes campos:" %>

<table width="690" border="0" align="center">
  
  <tr valign="top">
    <td height="40" align="left" class="dato" background="/images/topHeader.gif" colspan="4">Registrate</td>
  </tr>
  <tr><td>&nbsp;</td></tr>
	
  <tr>
     <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos">Datos de Cuenta</span></td>
  </tr>
    <tr><td>&nbsp;</td></tr>
  
  <tr>
    <td width="109"><%= f.label :login, 'Usuario' %>:</td>
    <td width="182"><%= f.text_field :login, :size => 20 %></td>
    <td width="133">&nbsp;</td>
    <td width="181">&nbsp;</td>
  </tr>
  <tr>
    <td width="109"><%= f.label :user_password, 'Contrasena' %>:</td>
    <td width="182"><%= f.password_field :password, :size => 20 %></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><%= f.label :user_password_confirmation, 'Confirmar' %>:</td>
    <td><%= f.password_field :password_confirmation, :size => 20 %></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><%= f.label :email, 'Correo' %>:</td>
    <td><%= f.text_field :email, :size => 20 %></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
    <tr><td>&nbsp;</td></tr>
    <tr>
    <td colspan="4" align="center" background="/images/vg.jpg"><span class="subdatos"> Datos Personales</span></td>
  </tr>
  
  <tr><td>&nbsp;</td></tr>
  
  <tr>
    <td><%= f.label :name, 'Nombre' %>:</td>
    <td><%= f.text_field :name, :size => 20 %></td>
    <td><%= f.label :sex, 'Sexo' %>:</td>
    <td><%= f.radio_button :sex, :M %>M <%= f.radio_button :sex, :F %>F</td>
  </tr>
  <tr>
    <td><%= f.label :lastname, 'Apellido' %>:</td>
    <td><%= f.text_field :lastname, :size => 20 %></td>
    <td><%= f.label :birthdate, 'Fecha Nacimiento' %></td>
    <td><% CalendarDateSelect.format=(:iso_date)%>
		<%= calendar_date_select_includes %> 
		<%= f.calendar_date_select :birthdate, :year_range => 80.years.ago..18.years.ago %>

</td>
  </tr>

	<tr><td>&nbsp;</td></tr>
    <tr>
    <td colspan="4" align="center"background="/images/vg.jpg"><span class="subdatos">Direccion</span></td>
  </tr>
  
  <tr><td>&nbsp;</td></tr>
  
  <tr>
    <td><%= f.label :address, 'Direccion' %>:</td>
    <td><%= f.text_area :address, :rows => 2, :cols => 16 %></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
	
    <td><%= f.label :country_idf, 'Pais' %>:</td>
    <td><%= f.collection_select( :country_idf, Country.find(:all), :id, :name,
                     {:prompt   => "<------Seleccione------>"} )%></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><%= f.label :city, 'Ciudad' %>:</td>
    <td><%= f.text_field :city, :size => 20 %></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><%= f.label :state, 'Estado' %>:</td>
    <td><%= f.text_field :state, :size => 20 %></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  
    <tr>
    <td><%= f.label :phone, 'Telefono' %>:</td>
    <td><%= f.text_field :phone, :size => 20 %></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  
  <tr><td>&nbsp;</td></tr>
  <tr><td colspan="4" align="center"><%= f.submit "Agregar Usuario" ,:class => "submit"%> </td></tr>
</table>


<% end %>